package com.yizhubao.app.activitys;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.github.chrisbanes.photoview.PhotoView;
import com.yizhubao.app.R;
import com.yizhubao.app.base.BaseActivity;
import com.yizhubao.app.utils.Constants;

import butterknife.BindView;
import cn.jzvd.JzvdStd;
import h.framework.pacy.utils.ImageUtil;

public class VideoActivity extends BaseActivity {
    @BindView(R.id.jz_video)
    JzvdStd jzvdStd;

    //地址
    private String path;



    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);// 隐藏标题栏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        super.onCreate(savedInstanceState);

    }

    @Override
    protected int setContentLayout() {
        return R.layout.activity_video;
    }

    @Override
    protected void initView() {
        Bundle bundle=getIntent().getExtras();
        path=bundle.getString("path");

    }

    @Override
    protected void initData() {
        jzvdStd.setUp(path
                , "");
        jzvdStd.startVideo();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (jzvdStd.backPress()) {
            return;
        }
    }

    @Override
    protected void onPause() {
        super.onPause();
        jzvdStd.releaseAllVideos();
    }

}